<!--面包屑插件-->
<template>
  <span @click="goto" class="v-breadcrumb_item" ref="isLastItem">
    <slot></slot>
    <span class="v-breadcrumb_separator">{{
      separator
    }}</span>
  </span>
</template>
<script>
export default {
  name: 'VBreadcrumbItem',
  props: {
    path: {
      type: String,
      default: ''
    },
    separator: {
      type: String,
      default: '/'
    }
  },
  methods: {
    goto() {
      this.path && this.$router.push(this.path)
    }
  }
}
</script>
<style lang="less" scope>
.v-breadcrumb_separator {
  padding: 0 6px;
}
.v-breadcrumb_item:last-child .v-breadcrumb_separator{
  display: none;
}
</style>
